<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8">
		<title></title>
		<meta name="renderer" content="webkit">
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
		<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
		<link rel="stylesheet" href="../../../layuiadmin/layui/css/layui.css" media="all">
		<link rel="stylesheet" href="../../../layuiadmin/style/admin.css" media="all">
		<link rel="stylesheet" href="../../../css/common.css" media="all">
		<style type= "text/css">
			td 	.layui-table-cell{
				text-align: center;
				height: 150px; 
				white-space: normal ;
			 }
			 .layui-table img,.layui-table video{
				 width: 50px;
				 max-width: 60px;
			 } 
			 td .layui-table-cell {
			     text-align: center;
			     height: 75px; 
			     vertical-align: middle;
			     white-space: normal; 
			 }
			 .tDiv{
				 font-size: 10px;
				 line-height: 15px;
			 	 text-align: left;
			 }
			 .tDiv-price{
				 font-size: 10px;
				 line-height: 13px;
			 } 
		 </style>
	</head>

	<body>

		<div class="layui-fluid">
			<div class="layui-card">
				<div class="layui-card-header table-operate-btn">
					<button class="layui-btn layui-btn-normal layui-btn-sm" data-type='alladd'>添加商品信息</button>
					<button class="layui-btn layui-btn-normal layui-btn-sm" data-type='del'>删除商品信息</button>
					<!--<button class="layui-btn layui-btn-normal layui-btn-sm" data-type='copy'>拷贝当前店铺商品信息</button>-->
					是否启用：
					<button class="layui-btn layui-btn-danger layui-btn-sm" data-type='off'>一键禁用</button>
					<button class="layui-btn layui-btn-container layui-btn-sm" data-type='on'>一键启用</button>
					是否推荐：
					<button class="layui-btn layui-btn-danger layui-btn-sm" data-type='off_recommend'>一键取消</button>
					<button class="layui-btn layui-btn-container layui-btn-sm" data-type='on_recommend'>一键推荐</button>
					<button class="layui-btn layui-btn-primary layui-btn-sm" data-type='edit'>一键编辑</button>
				</div>
				<div class="layui-card-body"> 
					<div class="layui-row layui-col-space15">
						<!--<div class="layui-btn-sm2 layui-col-md2 layui-col-xs2">
							<div id="test9" class="demo-tree demo-tree-box" style="width: 100%; height: 100%;"></div>
						</div>-->
						<div class="layui-btn-sm12 layui-col-md12 layui-col-xs12">
							<!-- 搜索 -->
							<form class="layui-form search" id="form" onsubmit="return false" action="##">
								<div class="layui-inline" id="input_li"></div>
								<!-- <div class="layui-inline search_inline">
									<label class="layui-form-label">商品状态：</label>
									<div class="layui-input-inline">
										<select name="status" class="on_off" lay-filter='goods_status'></select>
									</div>
								</div>
								<div class="layui-inline search_inline">
									<label class="layui-form-label">商品类型：</label>
									<div class="layui-input-inline">
										<select name="type" class="goods_type" lay-filter='goods_type'></select>
									</div>
								</div>
								 
								<div class="layui-inline search_inline">
									<label class="layui-form-label">商品编号：</label>
									<div class="layui-input-inline">
										<input class="layui-input" lay-verify="" name="skuid" placeholder="商品编号" autocomplete="off">
									</div>
								</div>
								<div class="layui-inline search_inline">
									<label class="layui-form-label">产品编号：</label>
									<div class="layui-input-inline">
										<input class="layui-input" lay-verify="" name="spuid" placeholder="产品编号" autocomplete="off">
									</div>
								</div>
								<div class="layui-inline search_inline">
									<label class="layui-form-label">商品、店铺名称：</label>
									<div class="layui-input-inline">
										<input class="layui-input" lay-verify="" name="keywords" placeholder="商品、店铺名称" autocomplete="off">
									</div>
								</div> -->
								<button class="layui-btn search_inline" lay-submit="" lay-filter="search" data-type="reload">搜索</button>
								<button class="layui-btn layui-btn-primary search_inline" type="reset">重置</button>
							</form>
							<!-- 搜索 -->
							<table id="test-table-operate" lay-filter="test-table-operate"></table>
							 
							<script type="text/html" id="test-table-operate-barDemo">
								<a class="layui-btn layui-btn-normal layui-btn-xs" lay-event="edit">编辑</a>
								{{# if(d.status == 0 ) {}}
								
									<a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</a>
								{{# }}}
							</script>
						</div>
					</div>
				</div>
			</div>
			<!--商品信息模板-->
			<!-- 主图 -->
			<script type="text/html" id="test-table-operate-img"> 
				<img src={{d.goods_image_url}} />
			</script>
			<!-- 视频 -->
			<script type="text/html" id="test-table-operate-video"> 
				<video>
					<source src="{{d.video_url}}"></source>
				</video>
			</script>
			
			<!-- 价格 -->
			<script type="text/html" id="test-table-operate-price">  
				<div class="tDiv" style=""> 
					<!-- 原价 -->
					<!-- 会员价 -->
					会员价： 
					<span class="line-text">   {{  d.price_member ? '￥' + d.price_member : ''}}</span>
					<br/>
					直推返现： 
					<span class="line-text">   {{  d.direct_fee ? '￥' + d.direct_fee   : ''}}</span>
					<br/>
					间推返现：
					<span class="line_text">   {{  d.indirect_fee ? '￥' + d.indirect_fee   : ''}}</span>
					<br/>
					团队返现：
					<span class="line_text">   {{  d.team_fee ? '￥' + d.team_fee   : ''}}</span>
					<br/>
					合伙人返现： 
					<span class="line-text">   {{  d.copartner_fee ? '￥' + d.copartner_fee : ''}}</span>
				</div>
			</script> 
			<!-- 商品信息 -->
			<script type="text/html" id="test-table-operate-goods">  
				<div class="tDiv" style="">  
					 商品名称： 
					<span class="line-text"> {{ d.skuname ? d.skuname : ''}}</span>
			 		<br/>
					 商品简称： 
					<span class="line-text"> {{ d.title ? d.title : ''}}</span>
			 		<br/>
					 <!--计量单位： 
					<span class="line-text"> {{ d.measure_unit ? d.measure_unit : ''}}</span>
			 		<br/>-->
					  规格名称： 
					<span class="line-text"> {{ d.specname ? d.specname : ''}}</span>
					<br/>
					 规格参数： 
					<span class="line-text"> {{ d.specparam ? d.specparam : ''}}</span> 
					<br/>
					分期：
					<span class="line_text">   {{  d.fq ? d.fq   : ''}}</span>
				</div>
			</script>
			<script type="text/html" id="zizeng">
				{{d.LAY_TABLE_INDEX+1}}
			</script>
			
			<script type="text/html" id="input_list">
				{{# layui.each(d,function(index,item){ }} 
					<div class="layui-inline search_inline">
						<label class="layui-form-label">{{item.name}}：</label>
						<div class="layui-input-inline">
						
						{{#  if(item.input_btn == 1){ }}
						
						<input class="layui-input" lay-verify="" name="{{item.id}}" placeholder="{{item.name}}" autocomplete="off">
						
						{{#  } else if(item.input_btn == 6) { }}
						
						<select name="{{item.id}}" class="{{item.sele}}" lay-filter='goods_status'></select>
							
						{{#  } }}
							
						</div>
					</div>
				{{# })}}
			</script>
			
			
			

			<script src="../../../layuiadmin/layui/layui.js"></script>
			<script src="../../../js/common.js" type="text/javascript" charset="utf-8"></script>
			<script>
				layui.config({
					base: '../../../layuiadmin/' //静态资源所在路径
				}).extend({
					index: 'lib/index' //主入口模块
				}).use(['index', 'table', 'tree','laytpl'], function() {
					var $ = layui.$,
						form = layui.form,
						tree = layui.tree,
						laytpl = layui.laytpl,
						table = layui.table;

					var _data = {};
					var _data1 = {};
					var maplist = JSON.parse(localStorage.getItem('lsmap'))
					
					initmodule();
					
					
					goods_status_show('option')
					on_off_show('option')
					goods_type_show("option")
					
					
					
					
					
					initdata();
					
					

					//用户管理
					function initdata() { 
						table.render({
							elem: '#test-table-operate',
							url: server.querygoods,
							height: 'full-150',
							//totalRow: true,
							cols: [
								[{
									type: 'checkbox',
									fixed: 'left',
									width: 50,
								}, {
									width: 50,
									field: 'zizeng',
									title: '#',
									fixed: 'left',
									templet: '#zizeng'
								},{
									width: 180,
									align: 'center',
									toolbar: '#test-table-operate-barDemo',
									title: '操作',
									totalRowText: '合计：',
									fixed: 'left'
								},{
									width: 100,
									align: 'center',
									toolbar: '#test-table-operate-img',
									title: '主图',
								},  {
									field: 'status',
									width: 120,
									title: '商品状态',
									templet: function(d) {
										var html = ''
										for(var i = 0; i < maplist.on_off.length; i++) {
											if(maplist.on_off[i].value == String(d.status)) {
												html = '<input type="checkbox" name="status" value=' + d.skuid +
													' lay-skin="switch" lay-text="启用|停用" lay-filter="status" checked>'
											} else {
												html = '<input type="checkbox" name="status" value=' + d.skuid +
													' lay-skin="switch" lay-text="启用|停用" lay-filter="status">'
											}
										}
										return html;
									}
								}, {
									field: 'recommend',
									width: 120,
									title: '商品推荐状态',
									templet: function(d) {
										var html = ''
										for(var i = 0; i < maplist.on_off.length; i++) {
											if(maplist.on_off[i].value == String(d.recommend)) {
												html = '<input type="checkbox" name="status" value=' + d.skuid +
													' lay-skin="switch" lay-text="开|关" lay-filter="recommend" checked>'
											} else {
												html = '<input type="checkbox" name="status" value=' + d.skuid +
													' lay-skin="switch" lay-text="开|关" lay-filter="recommend">'
											}
										}
										return html;
									}
								},{
									field: 'client', 
									width: 180,
									title: '客户端', 
									templet: function(d) {
										var client = d.client;
										if(client) {
											var client_leng = client.split(',');
											var client_show = ''
											for(var i = 0; i < client_leng.length; i++) {
												client_show += icon_type_show(1, client_leng[i]) + ','
											}
											return client_show
										} else {
											return ''
										}
									}
								},{
									field: 'type', 
									width: 100,
									title: '商品类型', 
									templet: function(d) {
										return String(d.type) ? goods_type_show(1,d.type):''
									}
								}, {
									field: 'skuid',
									width: 90,
									title: '商品编号'
								},{
									field: 'spuid',
									width: 90,
									title: '产品编号'
								},/*{
									field: 'level', 
									title: '专属等级', 
									width: 120,
									templet: function(d) {
										return String(d.level) ? site_union_show(1,d.level):'';
									}
								},*/{
									field: 'price_member',
									width: 250,
									title: '商品规格信息',
									toolbar:"#test-table-operate-goods"
								},{
									field: 'low_quantity',
									width: 250,
									title: '最低数量',
									toolbar:"#test-table-operate-goods"
								},{
									field: 'price_member',
									width: 150,
									title: '价格',
									toolbar:"#test-table-operate-price"
								},/*   {
									field: 'score_scale',
									width: 120,
									title: '积分使用比例',
									totalRow: true,
									sort:true
								},  {
									field: 'score',
									width: 120,
									title: '积分使用',
									totalRow: true,
									sort:true
								},*/ {
									field: 'stock',
									width: 100,
									title: '当前库存',
									totalRow: true
								}, {
									field: 'sales',
									width: 100,
									title: '销量',
									totalRow: true
								},{
									field: 'support',
									width: 160,
									title: '店铺信息',
								},/*{
									field: 'brand_name',
									width: 160,
									title: '品牌名称',
								},*/ {
									field: 'examples_img_url',
									width: 120,
									title: '示例图片',
									templet: function(d) {
										return d.examples_img_url ?
											'<a class="text_blue_color" href="javascript:;" lay-event="seeimgexamples">查看示例图片</a>' : ''
									}
								}, {
									field: 'goods_image_url',
									width: 120,
									title: '主图',
									templet: function(d) {
										return d.goods_image_url ?
											'<a class="text_blue_color" href="javascript:;" lay-event="seeimgzhu">查看主图</a>' : ''
									}
								}, {
									field: 'goods_gallery_urls',
									width: 100,
									title: '轮播图',
									templet: function(d) {
										return d.goods_gallery_urls ?
											'<a class="text_blue_color" href="javascript:;" lay-event="seeimglunbo">查看轮播图</a>' : ''
									}
								}, {
									field: 'video_url',
									width: 160,
									title: '视频链接',
									//toolbar:"#test-table-operate-video"
									templet: function(d) {
										return d.video_url ? '<a class="text_blue_color" href="javascript:;" lay-event="seevideo">查看视频</a>' : ''
									}
								},{
									field: 'video_cover',
									width: 120,
									title: '视频封面',
									templet: function(d) {
										return d.video_cover ?
											'<a class="text_blue_color" href="javascript:;" lay-event="seeivideo_cover">查看视频封面</a>' : ''
									}
								},{ 
									field: 'add_by',
									width: 100,
									title: '创建人',
								}, {
									field: 'addtime',
									width: 160,
									title: '创建时间',
								}, {
									field: 'edit_by',
									width: 100,
									title: '更新人',
								}, {
									field: 'edittime',
									width: 160,
									title: '更新时间',
								}]
							],
							page: true,
							where: _data,
							limit: limit,
							limits: limits,
							request: {
								pageName: 'page',
								limitName: 'size',
							},
							parseData: function(res) { //将原始数据解析成 table 组件所规定的数据
								return {
									"code": res.code, //解析接口状态
									"msg": res.msg, //解析提示文本
									"count": res.goods_list.pager.total, //解析数据长度
									"data": res.goods_list.data //解析数据列表
								};
							},
							done: function() {
											//lay-tree的颜色 
								var nodes = document.getElementsByClassName("layui-tree-txt");
								for(var i = 0; i < nodes.length; i++) {
									if(nodes[i].innerHTML === _data.name)
										nodes[i].style.color = "red";
									else
										nodes[i].style.color = "#555";
								}
							},
						});
					}
					//监听搜索
					form.verify({
						memberid: function(value, item) { //value：表单的值、item：表单的DOM对象
							if(!value) {
								return '姓名不能为空';
							}
						}
					});

					//监听搜索
					form.on('submit(search)', function(data) {
						_data = data.field
						initdata();
						return false;
					});

					$("button[type=reset]").on("click", function() {
						_data = {}
						initdata();
						document.getElementById("form").reset();
					});
					//监听工具条
					table.on('tool(test-table-operate)', function(obj) {
						var data = obj.data;
						if(obj.event === 'edit') {
							layer.open({
								type: 2,
								title: '修改商品',
								shadeClose: false,
								shade: 0.5,
								maxmin: true, //开启最大化最小化按钮
								area: ['90%', '90%'],
								content: '../model/edit_add.html?skuid=' + data.skuid,
								end: function() {}
							});
						}else if(obj.event === 'del') {
							var data = obj.data;
							var skuid = data.skuid
							layer.confirm('确定要删除该商品？', function(index) {
								
								submitDelete(skuid, 0)
								
							}, function() {
								initdata();
								layer.msg('取消操作');
							});
							
						} else if(obj.event === 'seeimgzhu') {
							var img_data = {
								"data": [{
									"src": data.goods_image_url
								}]
							}
							layer.photos({
								photos: img_data,
								anim: 5 //0-6的选择，指定弹出图片动画类型，默认随机
							});
						} else if(obj.event === 'seeimglunbo') {
							if(data.goods_gallery_urls) {
								var imgarr = data.goods_gallery_urls.split(',');
							}
							
							var img_data = {
								"data": []
							}
							for(var i = 0; i < imgarr.length; i++) {
								img_data.data.push({
									"src": imgarr[i]
								})
							}
							layer.photos({
								photos: img_data,
								anim: 5 //0-6的选择，指定弹出图片动画类型，默认随机
							});
						} else if(obj.event === 'seeivideo_cover') {
							if(data.video_cover) {
								var imgarr = data.video_cover.split(',');
							}

							var img_data = {
								"data": [ ]
							}
							for(var i = 0; i < imgarr.length; i++) {
								img_data.data.push({
									"src": imgarr[i]
								})
							}
							layer.photos({
								photos: img_data,
								anim: 5 //0-6的选择，指定弹出图片动画类型，默认随机
							});
						} else if(obj.event === 'seevideo') {
							layer.open({
								type: 1,
								//title: '修改客户资料',
								title: '',
								shadeClose: false,
								shade: 0.5,
								maxmin: true, //开启最大化最小化按钮
								area: ['80%', '80%'],
								content: '<video style="width:100%;height:100%" controls="controls" id=' + data.id + ' width="320" height="240"><source src=' + data.video_url + ' type="video/ogg" /><source src=' + data.video_url + ' video/mp4" /></video>',
							});
						} else if(obj.event === 'seeimgexamples'){
							var img_data = {
								"data": [{
									"src": data.examples_img_url
								}]
							}
							console.log(img_data);
							layer.photos({
								photos: img_data,
								anim: 5 //0-6的选择，指定弹出图片动画类型，默认随机
							});
						}
					});

					form.on('switch(status)', function(obj) {
						var skuid = this.value;
						layer.confirm('确定要修改状态？', function(index) {
							if(obj.elem.checked) {
								submitdata(skuid, 1)
							} else {
								submitdata(skuid, 0)
							}
						}, function() {
							initdata();
							layer.msg('取消操作');
						});

					});
					form.on('switch(recommend)', function(obj) {
						var skuid = this.value;
						layer.confirm('确定要修改推荐状态？', function(index) {
							if(obj.elem.checked) {
								submit_recommend(skuid, 1)
							} else {
								submit_recommend(skuid, 0)
							}
						}, function() {
							initdata();
							layer.msg('取消操作');
						});

					});

					function submit_recommend(skuid, recommend) {
						$.post(server.updategoods, {
							skuid: skuid,
							is_recommend: recommend
						}, function(res, status) {
							if(status == 'success') {
								if(res.code == 0) {
									layer.alert('操作成功', function() {
										layer.closeAll();
										initdata();
									});
								} else {
									layer.msg(res.msg);
									layer.closeAll('loading');
								}
							} else {
								layer.msg('服务器连接错误');
							}
						});
					}
					function submitdata(skuid, status) {
						$.post(server.updategoods, {
							skuid: skuid,
							status: status
						}, function(res, status) {
							if(status == 'success') {
								if(res.code == 0) {
									layer.alert('操作成功', function() {
										layer.closeAll();
										initdata();
									});
								} else {
									layer.msg(res.msg);
									layer.closeAll('loading');
								}
							} else {
								layer.msg('服务器连接错误');
							}
						});
					}
					function submitDelete(skuid) {
						$.post(server.deletegoods, {
							skuid: skuid
						}, function(res, status) {
							if(status == 'success') {
								if(res.code == 0) {
									layer.alert('操作成功', function() {
										layer.closeAll(); 
										table.reload('test-table-operate');
									});
								} else {
									layer.msg(res.msg);
									layer.closeAll('loading');
								}
							} else {
								layer.msg('服务器连接错误');
							}
						});
					}
				 	function del_goods(){
						var checkStatus = table.checkStatus('test-table-operate'),
							data = JSON.stringify(checkStatus.data);
						var skuid = "";
						for(var i = 0; i < checkStatus.data.length; i++) {
							skuid += checkStatus.data[i].skuid;
							if(i != checkStatus.data.length - 1) {
								skuid += ",";
							}
						} 
						layer.confirm('确定要删除所选的' + checkStatus.data.length + '条数据？', function() {
							$.ajax({
								url: server.deletegoods,
								type: 'post',
								dataType: 'json',
								data: {
									skuid: skuid
								},
								success: function(data) {
									if(data.code == '0') {
										layer.msg('操作成功');
										initdata();
									} else {
										layer.msg('操作失败');
										initdata();
									}
								},
								'error': function() {
									layer.msg('系统错误');
									initdata();
								}
							})
						});
					}
					function edit_status(status,msg){
						var checkStatus = table.checkStatus('test-table-operate'),
							data = JSON.stringify(checkStatus.data);
						var id = "";
						for(var i = 0; i < checkStatus.data.length; i++) {
							id += checkStatus.data[i].id;
							if(i != checkStatus.data.length - 1) {
								id += ",";
							}
						} 
						layer.confirm('确定要'+msg+'所选的' + checkStatus.data.length + '条数据？', function() {
							$.ajax({
								url: server.onoffgoods,
								type: 'post',
								dataType: 'json',
								data: {
									id: id,
									status: status
								},
								success: function(data) {
									if(data.code == '0') {
										layer.msg(msg+'成功');
										initdata();
									} else {
										layer.msg(msg+'失败');
										initdata();
									}
								},
								'error': function() {
									layer.msg('系统错误');
									initdata();
								}
							})
						});
					}
					function copy(){
						$.post(server.copygoods, {
						}, function(res, status) {
							if(status == 'success') {
								if(res.code == 0) {
									layer.alert('操作成功', function() {
										layer.closeAll(); 
										table.reload('test-table-operate');
									});
								} else {
									layer.msg(res.msg);
									layer.closeAll('loading');
								}
							} else {
								layer.msg('服务器连接错误');
							}
						});
					}
					function edit_recommend(status,msg){
						var checkStatus = table.checkStatus('test-table-operate'),
							data = JSON.stringify(checkStatus.data);
						var id = "";
						for(var i = 0; i < checkStatus.data.length; i++) {
							id += checkStatus.data[i].id;
							if(i != checkStatus.data.length - 1) {
								id += ",";
							}
						} 
						layer.confirm('确定要'+msg+'所选的' + checkStatus.data.length + '条数据？', function() {
							$.ajax({
								url: server.onoffgoods,
								type: 'post',
								dataType: 'json',
								data: {
									id: id,
									is_recommend: status
								},
								success: function(data) {
									if(data.code == '0') {
										layer.msg(msg+'成功');
										initdata();
									} else {
										layer.msg(msg+'失败');
										initdata();
									}
								},
								'error': function() {
									layer.msg('系统错误');
									initdata();
								}
							})
						});
					}
					

					//事件
					var active = {
						batchdel: function() {
							var checkStatus = table.checkStatus('LAY-user-back-role'),
								checkData = checkStatus.data; //得到选中的数据

							if(checkData.length === 0) {
								return layer.msg('请选择数据');
							}

							layer.confirm('确定删除吗？', function(index) {

								table.reload('LAY-user-back-role');
								layer.msg('已删除');
							});
						},
						alladd: function() {
							layer.open({
								type: 2,
								title: '添加商品',
								shadeClose: false,
								shade: 0.5,
								maxmin: true, //开启最大化最小化按钮
								area: ['90%', '90%'],
								content: '../model/edit_adddd.html',
								success: function(layero, index) {
									var iframe = window['layui-layer-iframe' + index]
									iframe.child(_data, index)
								},
								end: function() {}
							});
						},
						on: function() {
							  edit_status(1,"启用")
						},
						off: function() {
							  edit_status(0,"禁用")
						},
						on_recommend: function() {
							  edit_recommend(1,"推荐")
						},
						off_recommend: function() {
							  edit_recommend(0,"取消推荐")
						},edit: function() {
							layer.open({
								type: 2,
								title: '修改产品',
								shadeClose: false,
								shade: 0.5,
								maxmin: true, //开启最大化最小化按钮
								area: ['90%', '90%'],
								content: '../model/active_edit_add.html',
								success: function(layero, index) {
									var checkStatus = table.checkStatus('test-table-operate'),
										data = JSON.stringify(checkStatus.data);
									var id = "";
									var skuid = "";
									for(var i = 0; i < checkStatus.data.length; i++) {
										id += checkStatus.data[i].id;
										skuid += checkStatus.data[i].skuid;
										if(i != checkStatus.data.length - 1) {
											id += ",";
											skuid += ",";
										}
									}   
									var _datas = {}
									_datas.id = id;
									_datas.skuid = skuid
									var iframe = window['layui-layer-iframe' + index]
									iframe.child(_datas, index)
								},
								end: function() {
									
								} 
							});						
						},del: function() {
							  del_goods()
						},copy: function(){
							copy();
						}
						
						 
					}
					$('.table-operate-btn .layui-btn').on('click', function() {
						var type = $(this).data('type');
						active[type] ? active[type].call(this) : '';
					});
					
					
					function initmodule(){
						var modulelist = [
							{
								id:'status',
								name:'商品状态',
								input_btn:'6',
								sele:'on_off',
								inputlist:[]
							},
							{
								id:'type',
								name:'商品类型',
								sele:'goods_type',
								input_btn:'6',
							},
							{
								id:'skuid',
								name:'商品编号',
								input_btn:'1',
							},
							{
								id:'spuid',
								name:'产品编号',
								input_btn:'1',
							},
							{
								id:'keywords',
								name:'商品、店铺名称',
								input_btn:'1',
							}
						];
						// 1 输入框  2 点选按钮  3 多选按钮  4 文本输入框  5文本编辑器  6下拉框  7 上传图片
						console.log(modulelist)
						
						var getTpl = input_list.innerHTML,
						view = document.getElementById('input_li');
						laytpl(getTpl).render(modulelist, function(html) {
							view.innerHTML = html;
						}); 
					}
					
					
					
					
				});
			</script>
	</body>

</html>